﻿using UnityEngine;
using System.Collections;

public class CristalInit : MonoBehaviour {

	public GameObject nextCristal;

	IEnumerator Wait() {
		Debug.Log("Before Waiting 2 seconds");
		yield return new WaitForSeconds(2);
		Debug.Log("After Waiting 2 Seconds");
	}

	void cristal()
	{
		nextCristal.SetActive (true);

	}

	
	void OnTriggerEnter2D( Collider2D coll){



		if (coll.gameObject.tag != "player"){
			if(coll.gameObject.tag == "Fire_Bolt")
			{
						PontController.moving = true;
						Destroy (coll.gameObject);
						this.gameObject.SetActive(false);
						
						Invoke ("cristal",2.4f); 
			}
		}

	}
}